<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            display: inline-block;
            width: 100px;
            height: 100px;
            background-color: pink;
            animation: add 3s linear infinite;
        }
        /* 规定动画类似定义类选择器 */
        
        @keyframes add {
            100% {
                width: 1000px;
            }
        }
    </style>

</head>

<body>
    <div></div>
</body>

</html>